import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 全局样式
import './assets/styles/base.scss'
import { initRem } from './utils/rem'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

const pinia = createPinia()

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 初始化rem设置
initRem()

app.use(router)
app.use(pinia)
app.mount('#app')
app.use(ElementPlus)
